﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using MotoGame;

namespace Trunk.Jogo.Estados.Fases
{
    /// <summary>
    /// Gerencia as plataformas das fases
    /// </summary>
    class Plataforma:Sprite
    {

        public Plataforma(ContentManager Content, GameWindow Window, string Textura, Vector2 posicaoInicial)        //parametros: endereço da textura, ponto de origem//
            : base(Content.Load<Texture2D>(Textura))
        {
            this.Window = Window;

            this.posicao = posicaoInicial;
        }

        public override void Update(GameTime gameTime)
        {
           
        }
    
        public void Update(GameTime gameTime, Vector2 aux)          //parametros: vector do movimento paralax// 
        {
            posicao.X -= (int)(aux.X);
            posicao.Y -= (int)(aux.Y);
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(textura, new Rectangle((int)posicao.X, (int)posicao.Y, textura.Width, textura.Height), Color.White);
        }
    }
}
